package cn.iocoder.yudao.module.eval.dal.mysql.majorcategory;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.eval.dal.dataobject.majorcategory.MajorCategoryDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.eval.controller.admin.majorcategory.vo.*;

/**
 * 专业大类管理 Mapper
 *
 * @author 龙头企业
 */
@Mapper
public interface MajorCategoryMapper extends BaseMapperX<MajorCategoryDO> {

    default PageResult<MajorCategoryDO> selectPage(MajorCategoryPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<MajorCategoryDO>()
                .eqIfPresent(MajorCategoryDO::getCode, reqVO.getCode())
                .likeIfPresent(MajorCategoryDO::getName, reqVO.getName())
                .eqIfPresent(MajorCategoryDO::getVersion, reqVO.getVersion())
                .eqIfPresent(MajorCategoryDO::getStatus, reqVO.getStatus())
                .betweenIfPresent(MajorCategoryDO::getCreateTime, reqVO.getCreateTime())
                .orderByAsc(MajorCategoryDO::getCode));
    }

}